package com.example.demo.common.enums;

import lombok.Data;

/**
 * @Author: ak
 * @Date: 2020/4/1 0:20
 */
public enum CustomizeEnum implements BaseEnum{
    /**
     * 通用枚举
     */
    IMG_ERROR("图片上传异常",400),
    REGISTER_PASSWORD_ERROR("两次输入的密码不同",400),
    REGISTER_USER_EXIST("用户名已存在",400),
    LOGIN_UNKNOWN_ACCOUNT("未知账户",400),
    LOGIN_PASSWORD_ERROR("密码错误",400),
    LOGIN_ACCOUNT_LOCK("账户锁定",400),
    LOGIN_ERROR("登录失败",400),
    LOGIN_ADMIN("管理员登录成功",200),
    LOGIN_USER("用户登录成功",200),
    LOGIN_ERROR_COUNT_OVERMUCH("用户名或密码输入次数过多",400),
    USERNAME_OR_PASSWORD_ERROR("用户名或者密码错误",400),
    REGISTER_SUCCESS("注册成功",200),
    REGISTER_ERROR("用户名和密码必须由字母和数字组成,且长度大于8小于16",400),
    LOGIN_SUCCESS("登录成功",200)
    ;
    private String msg;
    private Integer code;

    CustomizeEnum(String msg, Integer code) {
        this.msg = msg;
        this.code = code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public void setCode(Integer code) {
        this.code = code;
    }
}
